home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 3333 < prev    next >
Encoding:
Text File  |  1996-08-06  |  1015 b   |  35 lines

  1. Path: eua.ericsson.se!usenet
  2. From: euahjn@eua.ericsson.se (Henrik Johansson)
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: Visual C++ 4.0 lacking initializers?
  5. Date: 23 Jan 1996 11:46:55 GMT
  6. Organization: Ericsson Telecom Systems Labs, Stockholm, Sweden
  7. Distribution: world
  8. Message-ID: <4e2hrf$9vt@euas20.eua.ericsson.se>
  9. References: <31049C46.A26@oz.is>
  10. Reply-To: euahjn@eua.ericsson.se
  11. NNTP-Posting-Host: euas31i2c37.eua.ericsson.se
  12. NNTP-Posting-User: euahjn
  13.  
  14. In article <31049C46.A26@oz.is>, Hßlfdan Ingvarsson <halfdan@oz.is> writes:
  15. > Is it me or is this sort of code not possible with VC++ 4.0? 
  16. > // Declarations of class Foo
  17. > // VC++ Complains about the line below with the error
  18. > // error C2436: '__ctor' : cannot initialize member functions
  19. > Foo::Foo(void) : Foo::Foo(10) {}
  20. > Foo::Foo(x)
  21. > {
  22. >   // Some stuff
  23. > }
  24. > Tell me about it,
  25.  
  26. Syntax error on a SUN too. Redesign your code. In this perticular case
  27. I think you shall provide a default value for x and only have one ctor
  28. Foo(int x = 10);
  29.  
  30.  
  31.